home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / Sherlock 2.0 / DevLibSrc / Main_DevLib / LIBlib.c < prev    next >
Text File  |  1996-02-09  |  3KB  |  117 lines

  1. /*
  2.     devlib: template for the application-specific version of this file.
  3.     
  4.     source:  LIBlib.c
  5.     started: January 7, 1994.
  6.     version:
  7.         February 9, 1996.
  8.             Changed lib_arg_file_prompt to lib_log_file_prompt.
  9.         September 26, 1995
  10.             err_begin must return TRUE by default.
  11.             Added lib_log_file_name.
  12. */
  13.  
  14. #include <LIBlib.h>
  15.  
  16.     /* Define variables used by devlib. */
  17.     
  18. pstring    lib_about_title        = "\pAbout XX";            /* Must be a pascal string. */
  19. char *    lib_log_file_prompt = "XX log file...";        /* Prompt for file name. */
  20.  
  21. char *    lib_dialog_version    = "XX version 1.0:\r\rCopyright © 1996 by Edward K. Ream.";
  22.  
  23. char *    lib_log_window_name    = "XX log";            /* The name of log window. */
  24. char *    lib_program_name    = "XX";                /* The name of the program. */
  25.  
  26. #if defined(THINK_C) || defined(SYMANTEC_C) || defined(__MWERKS__)
  27.     char *    lib_arg_file_name = "XXargs";    /* The name of the argument file. */
  28.     char *    lib_log_file_name = "XXlog";    /* The name of the log file. */
  29. #elif defined(applec)
  30.     char *    lib_arg_file_name = "XX MPW args";
  31.     char *    lib_log_file_name = "XX MPW log";
  32. #else
  33.     char *    lib_arg_file_name = "XXargs.txt";
  34.     char *    lib_log_file_name = "XXlog.txt";
  35. #endif
  36.  
  37. char *    lib_version = "XX version 1.0";
  38.  
  39. /*
  40.     The following functions should be defined in appropriate places in the application
  41.     as indicated.
  42.     
  43.     What follows are minimal defintions that should be "over-ridden"
  44. */
  45.  
  46. /* XXend.c: close all application files. */
  47. void
  48. end_close_all(void)
  49. {
  50.     FTAG("end_close_all");
  51.     STATB(ftag);
  52.     STATX(ftag);
  53. }
  54.  
  55. /* XXerr.c: start an error message. */
  56. bool
  57. err_begin(void)
  58. {
  59.     FTAG("err_begin");
  60.     STATB(ftag);
  61.     ecnls(2);
  62.     STATX(ftag);
  63.     return TRUE;
  64. }
  65.  
  66. /* XXerr.c: print the context, if any, of an error. */
  67. void
  68. err_context(void)
  69. {
  70.     FTAG("err_context");
  71.     STATB(ftag);
  72.     STATX(ftag);
  73. }
  74.  
  75. /* XXes.c or XXerr.c: print the start of an ASSERT failed message. */
  76. void es_assert_failed(char * condition, int line, char * file)
  77. {
  78.     FTAG("es_assert_failed");
  79.     STATB(ftag);
  80.     STATX(ftag);
  81. }
  82.  
  83. /* XXes.c or XXerr.c: print the start of a PERM_ASSERT_TRACE failed message. */
  84. void es_internal_err(char * condition, int line, char * file)
  85. {
  86.     FTAG("es_internal_error");
  87.     STATB(ftag);
  88.     STATX(ftag);
  89. }
  90.  
  91. /* XXerr.c: start a fatal error message. */
  92. void
  93. fatal_begin(void)
  94. {
  95.     FTAG("err_begin");
  96.     STATB(ftag);
  97.     STATX(ftag);
  98. }
  99.  
  100. /* XXerr.c: end a fatal error message. */
  101. void
  102. fatal_end(void)
  103. {
  104.     FTAG("err_begin");
  105.     STATB(ftag);
  106.     STATX(ftag);
  107. }
  108.  
  109. /* XXmain.c: Print any end-of-application reports. */
  110. void
  111. main_quit(void)
  112. {
  113.     FTAG("main_quit");
  114.     STATB(ftag);
  115.     STATX(ftag);
  116. }
  117.